package com.itheima.service.Impl;

import com.itheima.dao.RoleDao;
import com.itheima.domain.Role;
import com.itheima.service.RoleService;

import java.util.List;

public class RoleServiceImpl implements RoleService {
    private RoleDao roleDao;
    public void setRoleDao(RoleDao roleDao){
        this.roleDao=roleDao;
    }
    public List<Role> list() {
        List<Role> roleList = roleDao.findAll();
        return roleList;
    }

    public void save(String roleName,String roleDesc) {
      roleDao.save(roleName,roleDesc);
    }
}
